%{
#include <stdio.h>
#include "declaration.tab.h"`

#define YYSTYPE char* 



%}

delim   [\t]
ws      {delim}+
D       [0-9]
L       [a-zA-Z_]
H       [a-fA-F0-9]



%%
{ws} {}
"path"					{ yylval = strdup(yytext);    return ATTRIBUTE; }
"size"          { yylval = strdup(yytext);    return ATTRIBUTE; }
"position_to"   { yylval = strdup(yytext);    return ATTRIBUTE; }
"distance"      { yylval = strdup(yytext);    return ATTRIBUTE; }
"direction"     { yylval = strdup(yytext);    return ATTRIBUTE; }
"z-axis"        { yylval = strdup(yytext);    return ATTRIBUTE; }
"content"               { yylval = strdup(yytext);    return ATTRIBUTE;}
"font_size"             { yylval = strdup(yytext);    return ATTRIBUTE;}
"font_type"             { yylval = strdup(yytext);    return ATTRIBUTE;}
"default_distance"      { yylval = strdup(yytext);    return ATTRIBUTE;}
"default_font_type"     { yylval = strdup(yytext);    return ATTRIBUTE;}
"default_font_size"     { yylval = strdup(yytext);    return ATTRIBUTE;}
"int"						{yylval = strdup(yytext);    return TYPE;}
"string"				{yylval = strdup(yytext);    return TYPE;}
"doc"						{yylval = strdup(yytext);    return TYPE;}
"label"					{yylval = strdup(yytext);    return TYPE;}
"obj"						{yylval = strdup(yytext);    return TYPE;}
"pic"						{yylval = strdup(yytext);    return TYPE;}
"#"						{yylval = strdup(yytext);    return TYPE;}




{L}({L}|{D})*	{ yylval = strdup(yytext); return IDENTIFIER;}
{D}+            { yylval = strdup(yytext); return CONSTANT;}
{D}*"."{D}+	{ yylval = strdup(yytext); return CONSTANT;}
{D}+"."{D}*	{ yylval = strdup(yytext); return CONSTANT;} 

"("                     {   return('('); } 
")"                     {   return(')'); } 
("["|"<:")              {   return('['); } 
("]"|":>")              {   return(']'); } 



" " { }
"-"                     {  return('-'); } 
"+"                     {  return('+'); } 
"*"                     {  return('*'); } 
"/"                     {  return('/'); } 
"%"                     {  return('%'); } 
"="			{  return('='); } 
"!"                     {  return('!'); } 
"&&"                    {   return(AND_OP); } 
"||"                    {   return(OR_OP); } 
"<="                    {   return(LE_OP); } 
">="                    {   return(GE_OP); } 
"=="                    {   return(EQ_OP); } 
"!="                    {   return(NE_OP); } 
"<"                     {   return('<'); } 
">"                     {   return('>'); } 
"."                     {   return('.'); } 
","											{		return(','); }
";"											{		return(';'); }
"{"						{	return('{'); }
"}"						{	return('}'); }
\n                     {	return NL;}
%%

